import {loadModules, mountToApp} from "@/infrastructure/utils/common"


// 加载当前环境下的配置
const env = process.env.MODE || process.env.NODE_ENV
const config = loadModules(import.meta.globEager("./modules/*.js"))
config.env = (await import(`./env/${env}.js`)).default
uni.$config = config

const install = Vue => {
	
	mountToApp(Vue, '$config', config)
}


 
export function setupConfig(app){
	app.use(install)
}